package PTA.Mianxiangduixiang.ex27;
import PTA.Mianxiangduixiang.ex42.P;

import java.util.Objects;
import java.util.Scanner;
class Point implements Comparable<Point>{
    private int x;
    private int y;
    public Point(int x,int y) {
        this.x = x;
        this.y = y;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    @Override
    public String toString() {
        return "Point [" +
                "x=" + x +
                ", y=" + y +
                ']';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Point point = (Point) o;
        return x == point.x && y == point.y;
    }

    @Override
    public int hashCode() {
        return Objects.hash(x, y);
    }


    @Override
    public int compareTo(Point o) {
        //Point p1 = (Point)o;
        if(this.x>o.x){
           return 1;
        }else if(this.x<o.x) {
            return -1;
        }else if(this.y>o.y){
            return 1;
        }else if(this.y<o.y){
            return -1;
        }else{
            return 0;
        }

    }
    public int distance(Point p2){
        double result = (this.x-p2.x)*(this.x-p2.x)+(this.y-p2.y)*(this.y-p2.y);

        return (int) Math.sqrt(result);
    }

}
public class ex27 {
    public static void main(String[] args) {
        Scanner sc=  new Scanner(System.in);
int x1 = sc.nextInt();
int y1 = sc.nextInt();
int x2 = sc.nextInt();
int y2 = sc.nextInt();
       Point p1 = new Point(x1,y1);
       Point p2 = new Point(x2,y2);
        System.out.println(p1.toString());
       if(p1.compareTo(p2)>=0){
           System.out.println("true");
       }else if(p1.compareTo(p2)<=0) {
           System.out.println("false");
       }
        System.out.println(p1.distance(p2));
    }
}
/*
* import java.util.Objects;
import java.util.Scanner;
class Point implements Comparable<Point>{
    private int x;
    private int y;
    public Point(int x,int y) {
        this.x = x;
        this.y = y;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    @Override
    public String toString() {
        return "Point [" +
                "x=" + x +
                ", y=" + y +
                ']';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Point point = (Point) o;
        return x == point.x && y == point.y;
    }

    @Override
    public int hashCode() {
        return Objects.hash(x, y);
    }


    @Override
    public int compareTo(Point o) {
        //Point p1 = (Point)o;
        if(this.x>o.x){
           return 1;
        }else if(this.x<o.x) {
            return -1;
        }else if(this.y>o.y){
            return 1;
        }else if(this.y<o.y){
            return -1;
        }else{
            return 0;
        }

    }
    public int distance(Point p2){
        double result = (this.x-p2.x)*(this.x-p2.x)+(this.y-p2.y)*(this.y-p2.y);

        return (int) Math.sqrt(result);
    }

}
public class Main {
    public static void main(String[] args) {
        Scanner sc=  new Scanner(System.in);
int x1 = sc.nextInt();
int y1 = sc.nextInt();
int x2 = sc.nextInt();
int y2 = sc.nextInt();
       Point p1 = new Point(x1,y1);
       Point p2 = new Point(x2,y2);
        System.out.println(p1.toString());
       if(p1.compareTo(p2)>=0){
           System.out.println("true");
       }else if(p1.compareTo(p2)<=0) {
           System.out.println("false");
       }
        System.out.println(p1.distance(p2));
    }
}

* */